<%@ page import="com.the8thfold.anton.users.Roles; com.the8thfold.anton.ant.JobStatus; org.apache.tools.ant.Target" contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>Create Script</title>
    <meta name="layout" content="main" />
</head>
<body>

<div>
    <h1>Create Script</h1>
    <hr/>
    <br/>
    <div>
        <g:uploadForm controller="script" action="save" name="newScriptForm">
            <table style="border: none; width: auto;">
                <tr>
                    <td>Name:</td>
                    <td>
                        <input type="text" id="scriptName" name="scriptName" value="${script?.description}"/>
                    </td>
                </tr>
                <tr>
                    <td>Script:</td>
                    <td>
                        <input type="file" id="scriptFile" name="scriptFile" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2"><hr/></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <sec:ifAllGranted roles="${Roles.ROLE_SCRIPT_ADMIN}">
                            <div class="css_right toolbar">
                            <input type="button" class="btn-text" name="cancel" onclick="history.go(-1);" value="Cancel"/>
                            <g:submitButton name="submit" value="Create" />
                        </div>
                        </sec:ifAllGranted>
                    </td>
                </tr>
            </table>
        </g:uploadForm>
    </div>
</div>

</body>
</html>